/***************************************************************************
 *   Copyright (C) 2008 by Dmitry Malakhov                                 *
 *   abr_mail@mail.ru                                                      *
 *                                                                         *
 *   This file is part of game Fifteens                                    *
 *                                                                         *
 *   Fifteens is free software; you can redistribute it and/or modify      *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   Fifteens is distributed in the hope that it will be useful,           *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

/*lib.h*/

#include <gtk/gtk.h>

GtkWidget *window;

void make_menu(GtkWidget *container);
void make_buttons(GtkWidget *container);
gboolean button_click(GtkWidget *widget, gpointer data);
int check_move(int index);
gboolean on_timeout(GtkWidget *widget);
void init_values();
void array_add(int *arr[], int *arr_p, int d);
void shrink_array(int *arr[], int *arr_p);
void expand_work_to_do();
void shrink_work_to_do();
void clear_history();
int get_from_console(int k);
gboolean game_finished();
void menuitem_1_1_response(int k);
void menuitem_1_2_response();
void menuitem_1_3_response();
void menuitem_2_1_response();
void menuitem_2_2_response();
void menuitem_3_response();
void buttons_lock(gboolean state);
int find_by_coords(int x, int y);
void * mix(void *steps);
void * solve(void *arg);
